package com.lemt.common.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lemt.common.pojo.Address;
import com.lemt.common.mapper.AddressMapper;
import com.lemt.common.service.IAddressService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zik
 * @since 2023-09-10
 */
@Service(value = "AddressService")
public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> implements IAddressService {

    @Resource
    private AddressMapper addressMapper;

    @Override
    public List<Address> getAll(Integer id) {
        return addressMapper.selectList(new LambdaQueryWrapper<Address>().eq(Address::getUserId ,id));
    }
}
